package org.note.law.module.law;

import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.lboot.jpa.jpa.AbstractJpaCurdExt;

import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;
import org.springframework.stereotype.Service;

import java.util.List;

@Slf4j
@Service
@AllArgsConstructor
public class LawCodeServiceImpl extends AbstractJpaCurdExt<String, LawCode, LawCodeDAO> implements LawCodeService{
    @Override
    public List<LawCode> getByCodeName(String codeName) {
        return dao.findByCodeName(codeName);
    }

    @Override
    public List<LawCode> getByCodeNameAndCodeVersion(String codeName, String codeVersion) {
        return dao.findByCodeNameAndCodeVersion(codeName , codeVersion);
    }

    @Override
    public Page<LawCode> getAllMatcher(Pageable pageable, String key) {
        return dao.findAllMatcher(pageable, key);
    }

    @Override
    public Page<LawCode> getAllIgnoreFile(Pageable pageable) {
        return dao.findAllIgnoreFile(pageable);
    }
}
